import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import {resolve} from 'path'
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'

export default defineConfig({
  plugins: [vue(),vueJsxPlugin()],
  resolve:{
    alias:{
      '@':resolve(__dirname,'./src')
    }
  },
  server: {
    port:2222,
    proxy: {
      "/api": {
        changeOrigin: true,
        ws: false,
        secure: false,
        target: "http://127.0.0.1:2223",
      },
    },
  },
  css:{
    preprocessorOptions:{
      less:{
        javascriptEnabled: true,
      }
    }
  }
});
